<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0%;
      margin: 0;
    }
    .box {
      width: 100px;
      height: 100px;
      margin: 100px 600px;
      position: absolute;
    }
    p {
      width: 20px;
      height: 20px;
      background-color: skyblue;
      border-radius: 50%;
      margin: 10px;
      position: absolute;
      animation: loading 2s linear infinite;
    }
    .box p:nth-of-type(1) {
      left: 0;
      top: 0;
    }
    .box p:nth-of-type(2) {
      right: 0;
      top: 0;
    }
    .box p:nth-of-type(3) {
      right: 0;
      bottom: 0;
    }
    .box p:nth-of-type(4) {
      left: 0;
      bottom: 0;
    }
    .box:nth-of-type(2) {
      transform: rotate(45deg);
    }
    @keyframes loading {
      0% {
        transform: scale(0);
      }
      50% {
        transform: scale(1);
      }
      100% {
        transform: scale(0);
      } 
    }
    .box:nth-of-type(1) p:nth-of-type(1) {
      animation-delay: 0.1s;
    }
    .box:nth-of-type(2) p:nth-of-type(1) {
      animation-delay: 0.3s;
    }
    .box:nth-of-type(1) p:nth-of-type(2) {
      animation-delay: 0.5s;
    }
    .box:nth-of-type(2) p:nth-of-type(2) {
      animation-delay: 0.7s;
    }
    .box:nth-of-type(1) p:nth-of-type(3) {
      animation-delay: 0.9s;
    }
    .box:nth-of-type(2) p:nth-of-type(3) {
      animation-delay: 1.1s;
    }
    .box:nth-of-type(1) p:nth-of-type(4) {
      animation-delay: 1.3s;
    }
    .box:nth-of-type(2) p:nth-of-type(4) {
      animation-delay: 1.5s;
    }
  </style>
</head>
<body>
  <div class="box">
    <p></p>
    <p></p>
    <p></p>
    <p></p>
  </div>
  <div class="box">
    <p></p>
    <p></p>
    <p></p>
    <p></p>
  </div>
</body>
</html>